﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<WebClient.Models.ViewModels.GroupViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
		<% if (ViewData["RegisterResult"] != null && ViewData["RegisterResult"].ToString() != ""){ %>
			alert('<%= ViewData["RegisterResult"].ToString() %>');
		<% } %>
	</script>
    <%
        var username = ViewData["RegisterUserName"] == null ? string.Empty : ViewData["RegisterUserName"].ToString();
        var password = ViewData["RegisterPassword"] == null ? string.Empty : ViewData["RegisterPassword"].ToString();
        var email = ViewData["RegisterEmail"] == null ? string.Empty : ViewData["RegisterEmail"].ToString();
        var name = ViewData["RegisterName"] == null ? string.Empty : ViewData["RegisterName"].ToString();
        var phone = ViewData["RegisterPhone"] == null ? string.Empty : ViewData["RegisterPhone"].ToString();
        var address = ViewData["RegisterAddress"] == null ? string.Empty : ViewData["RegisterAddress"].ToString();
    %>
    <div id="content">
        <div id="container_new">
            <div id="divleft_approve">
                <h1 class="h1">Register to make your Order</h1>    
                <div id="greyline" style="width:800px;"></div>
                <div id="formdiv">
                    <% using (Html.BeginForm("Register", "Account", FormMethod.Post, new { onsubmit = "return ValidateRegister();" }))
                       { %>
                        <div id="checkout_left_block" style="width: 525px;">
                            <div><h2>Personal Details</h2></div>
                            <div id="clear"></div>
                            <div id="checkoutleft">UserName*</div>
                            <div id="checkoutlogin">
                                <input style="width:150px;" type="text" name="NguoiDung_UserName" id="Text1" class="checkout_input" value="<%= username %>" maxlength="20" />
                            </div>
                            <div id="clear"></div>
                            <div id="checkoutleft">Password*</div>
                            <div id="checkoutlogin">
                                <input style="width:150px;" type="password" name="NguoiDung_Password" id="password1" class="checkout_input" value="<%= password %>" maxlength="10" title="Your password should be at least 6 characters" />
                            </div>
                            <div id="clear"></div>
                            <div id="checkoutleft">Retype password*</div>
                            <div id="checkoutlogin">
                                <input style="width:150px;" type="password" name="NguoiDung_ConfirmPassword" id="password2" class="checkout_input" value="<%= password %>" maxlength="10" />
                            </div>
                            <div id="clear"></div>
                            <div id="checkoutleft">E-Mail*</div>
                            <div id="checkoutlogin">
                                <input style="width:200px;" type="text" name="NguoiDung_Email" id="email1" title="Your email will be used to send you a confirmation of your order and for the next time you login." class="checkout_input" value="<%= email %>" maxlength="80"  />
                            </div>
                            <div id="clear"></div>
                            <div id="checkoutleft">Name*</div>
                            <div id="checkoutlogin">
                                <input style="width:200px;" type="text" name="NguoiDung_Name" id="firstname" class="checkout_input" value="<%= name %>" maxlength="20" />
                            </div>
                            <div id="clear"></div>
                            <div id="checkoutleft">Phone</div>
                            <div id="checkoutlogin">
                                <input style="width:150px;" type="text" name="NguoiDung_Phone" id="phone" title="You can only make an order with a valid phone number!" class="checkout_phone" value="<%= phone %>" maxlength="15" />
                            </div>
                            <div id="clear"></div>
                            <div id="checkoutleft">Address</div>
                            <div id="checkoutlogin">
                                <input style="width:400px;" type="text" name="NguoiDung_Address" id="gsm" title="By entering a mobile phone number you will be able to receive order confirmations by sms" class="checkout_phone" value="<%= address %>" maxlength="15" />
                            </div>
                            <div id="clear"></div>
                            <div style="padding-left: 10px;">&nbsp;</div>
                            <div id="check_app">
                                <input type="submit" name="sbt2" id="sbt2" value="Register" title="Click the button to proceed to delivery and payment details" class="submitbutton" />
                            </div>
                        </div>
                    <% } %>
                </div>
            </div>
            <div style="margin-top:10px;">&nbsp;</div>
        </div>
    </div>
</asp:Content>
